package com.example;

/**
 * Created by dllo on 16/1/20.
 */
public class RubberDuck extends Duck implements QuackBehavior{
    public RubberDuck() {
        setQuackBehavior(this);
    }

    @Override
    public void display() {
        System.out.print("橡皮鸭");
    }

    @Override
    public void swim() {
        System.out.print("橡皮鸭会游泳");
    }

    @Override
    public void quack() {
        System.out.print("橡皮鸭吱吱叫");
    }
}
